using System;
using System.Collections;
using CE.Database;
/// <summary>
/// Summary description for UserProfileDB
/// </summary>
/// 
namespace CE.HomeRefinancing
{
    public class ApplicationDetailDB
    {
        public ApplicationDetailDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(ApplicationDetail appdetail)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocHFAppDetailInsertUpdateSingleItem]";
            
            SortedList _sPara = new SortedList();
            
            #region Parameter
                _sPara.Add("HFAppID", appdetail.HFAppID );
                _sPara.Add("CEID", appdetail.CEID );
                _sPara.Add("PostCode", appdetail.PostCode );
                _sPara.Add("UnitNo1", appdetail.UnitNo1 );
                _sPara.Add("UnitNo2", appdetail.UnitNo2  );
                _sPara.Add("Address1", appdetail.Address1 );
                _sPara.Add("Address2", appdetail.Address1 );
                _sPara.Add("FloorNo", appdetail.Address2 );
                _sPara.Add("City", appdetail.City );
                _sPara.Add("Country", appdetail.Country );
                _sPara.Add("HasJointBorrower", appdetail.HasJointBorrower );
                _sPara.Add("JBRefId", appdetail.JBRefId );
                _sPara.Add("@Status", appdetail.Status);
                _sPara.Add("@Info1", appdetail.Info1);
                _sPara.Add("@Info2", appdetail.Info2);
                _sPara.Add("@Info3", appdetail.Info3);
                _sPara.Add("@Info4", appdetail.Info4);
                _sPara.Add("@Info5", appdetail.Info5);
                _sPara.Add("@Info6", appdetail.Info6);
                _sPara.Add("@Info7", appdetail.Info7);
                _sPara.Add("@Info8", appdetail.Info8);
                _sPara.Add("@Info9", appdetail.Info9);
                _sPara.Add("@Info10", appdetail.Info10);
                _sPara.Add("@Info11", appdetail.Info11);
                _sPara.Add("@Info12", appdetail.Info12);
                _sPara.Add("@Info13", appdetail.Info13);
                _sPara.Add("@Info14", appdetail.Info14);
                _sPara.Add("@Info15", appdetail.Info15);
                _sPara.Add("@Info16", appdetail.Info16);
                _sPara.Add("@Info17", appdetail.Info17);
                _sPara.Add("@Info18", appdetail.Info18);
                _sPara.Add("@Info19", appdetail.Info19);
                _sPara.Add("@Info20", appdetail.Info20);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }
        
    }
}